package collection;

import java.util.ArrayList;
import java.util.List;

public class SubListDemo {
    public static void main(String[] args) {
        List<Integer> intw=new ArrayList<>();
        for (int i = 0; i <10; i++) {
            intw.add(i*10);
        }
        System.out.println(intw);
        List<Integer> subList=intw.subList(3,8);
        System.out.println(subList);
        for (int i = 0; i <subList.size() ; i++) {
            subList.set(i, subList.get(i)*10);
        }
        System.out.println(subList);

        System.out.println(intw);

        intw.remove(0);//报错，
        System.out.println(subList);
    }
}
